
all : boot.bin master.img

boot.bin : boot.asm
	nasm $< -o $@

master.img : boot.bin
	@echo "write $< to $@ ..."
	-dd if=$< of=$@ bs=512 count=1 conv=notrunc,noerror >/dev/null 2>&1

master.vmdk : master.img
	@echo "convert $< to $@ ..."
	-qemu-img convert -f raw -O vmdk $< $@ >/dev/null 2>&1

clean :
	-rm -f *.bin master.vmdk 

bochs : master.img
	@echo "boot bochs from $< ..."
	-bochs -q

.PHONY : clean bochs

